home *** CD-ROM | disk | FTP | other *** search
/ Especial Multimedia / Especial Multimedia.iso / Multimed / Prg / DEPAL.ZIP / SOURCE.ZIP / COMPAL.FRM next >
Text File  |  1995-03-18  |  2KB  |  107 lines

  1. VERSION 2.00
  2. Begin Form ComPal 
  3.    BackColor       =   &H00E0E0E0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Common"
  6.    ClientHeight    =   3975
  7.    ClientLeft      =   3510
  8.    ClientTop       =   870
  9.    ClientWidth     =   4230
  10.    Height          =   4665
  11.    Left            =   3450
  12.    LinkTopic       =   "Form2"
  13.    ScaleHeight     =   3975
  14.    ScaleWidth      =   4230
  15.    Top             =   240
  16.    Width           =   4350
  17.    Begin CheckBox ckTop 
  18.       Caption         =   "Top"
  19.       FontBold        =   -1  'True
  20.       FontItalic      =   0   'False
  21.       FontName        =   "MS Sans Serif"
  22.       FontSize        =   9.75
  23.       FontStrikethru  =   0   'False
  24.       FontUnderline   =   0   'False
  25.       Height          =   315
  26.       Left            =   3360
  27.       TabIndex        =   0
  28.       Top             =   120
  29.       Width           =   795
  30.    End
  31.    Begin XPAL Pal 
  32.       Height          =   3390
  33.       IDP             =   18768
  34.       Left            =   60
  35.       System          =   0   'False
  36.       Top             =   540
  37.       Width           =   4110
  38.    End
  39.    Begin Menu M_file 
  40.       Caption         =   "File"
  41.       Begin Menu M_read 
  42.          Caption         =   "Read"
  43.       End
  44.       Begin Menu M_write 
  45.          Caption         =   "Write"
  46.       End
  47.    End
  48.    Begin Menu M_image 
  49.       Caption         =   "Image"
  50.    End
  51.    Begin Menu M_shift 
  52.       Caption         =   "Shift"
  53.    End
  54. End
  55. Option Explicit
  56.  
  57. Sub ckTop_Click ()
  58.     Me.SetFocus
  59.     Call TopMost(Me.hWnd, ckTop)
  60. End Sub
  61.  
  62. Sub M_image_Click ()
  63.     
  64.     Dim n As Integer
  65.     
  66.     For n = 0 To 255
  67.         Pal.Cindex = n
  68.         DibPal!Pal.Cindex = n
  69.         Pal.Color = DibPal!Pal.Color
  70.     Next n
  71.  
  72. End Sub
  73.  
  74. Sub M_read_Click ()
  75.     Dim filename As String
  76.     filename = InputBox$("Enter File Name")
  77.     If filename = "" Then Exit Sub
  78.     Call ReadPalette(Pal, filename)
  79. End Sub
  80.  
  81. Sub M_shift_Click ()
  82.  
  83.     Dim n As Integer
  84.     Dim Color As Long
  85.  
  86.     For n = 245 To 0 Step -1
  87.         Pal.Cindex = n
  88.         Color = Pal.Color
  89.         Pal.Cindex = n + 10
  90.         Pal.Color = Color
  91.     Next n
  92.  
  93.     For n = 0 To 9
  94.         Pal.Cindex = n
  95.         Pal.Color = 0
  96.     Next n
  97.  
  98. End Sub
  99.  
  100. Sub M_write_Click ()
  101.     Dim filename As String
  102.     filename = InputBox$("Enter File Name")
  103.     If filename = "" Then Exit Sub
  104.     Call WritePalette(Pal, filename)
  105. End Sub
  106.  
  107.